home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 23 / Macromedia xRes Versión 2.0 completa (Spain) / MF 23 Gr ficos.bin / xRes 2.0 SE / Access / XresACCESS_SE.Dxr / 00161_Invisible Rectangle.ls < prev    next >
Encoding:
Text File  |  1996-04-05  |  2.5 KB  |  92 lines

  1. global gProgramInstalled, gthisMC, glastMC, gAttractObject, gNextAttractTime, waitBetweenAttract, theActiveMenuSprite, spinnerCastList
  2.  
  3. on mouseEnter
  4.   set gotRollover to 0
  5.   repeat with i = 4 to 9
  6.     if rollOver(i) then
  7.       if not (i = theActiveMenuSprite) then
  8.         if objectp(gAttractObject) then
  9.           kill(gAttractObject)
  10.         end if
  11.         set gNextAttractTime to the ticks + waitBetweenAttract
  12.         set menuVis to i + 7
  13.         if not (the visible of sprite menuVis = 1) then
  14.           playSound("MM mouse-down")
  15.         end if
  16.         set theActiveMenuSprite to i
  17.         set gotRollover to 1
  18.         set theLocList to [point(41, 145), point(246, 96), point(455, 114), point(40, 259), point(247, 281), point(455, 319)]
  19.         puppetSprite(3, 1)
  20.         set theHit to i - 3
  21.         set the castNum of sprite 3 to getAt(spinnerCastList, theHit)
  22.         set the loc of sprite 3 to getAt(theLocList, theHit)
  23.         HideAllMenusBut(i)
  24.         updateStage()
  25.       end if
  26.       exit repeat
  27.     end if
  28.   end repeat
  29. end
  30.  
  31. on HideAllMenusBut whichMenu
  32.   repeat with i = 4 to 9
  33.     if i <> whichMenu then
  34.       set theMenu to i + 7
  35.       puppetSprite(theMenu, 1)
  36.       set the locH of sprite theMenu to -1000
  37.     end if
  38.   end repeat
  39.   updateStage()
  40.   set the visible of sprite (whichMenu + 7) to 1
  41.   repeat with i = 4 to 9
  42.     if i <> whichMenu then
  43.       set theMenu to i + 7
  44.       set the visible of sprite theMenu to 0
  45.       puppetSprite(theMenu, 0)
  46.     end if
  47.   end repeat
  48. end
  49.  
  50. on mouseWithin
  51.   set gotTheRollover to 0
  52.   repeat with whichSprite = 4 to 8
  53.     if rollOver(whichSprite) then
  54.       set NeedToReenter to the puppet of sprite 3 = 0
  55.       if (whichSprite <> theActiveMenuSprite) or NeedToReenter then
  56.         mouseExit()
  57.         mouseEnter()
  58.       end if
  59.       if objectp(gAttractObject) then
  60.         kill(gAttractObject)
  61.       end if
  62.       set gNextAttractTime to the ticks + waitBetweenAttract
  63.       set gotTheRollover to 1
  64.       exit repeat
  65.     end if
  66.   end repeat
  67.   if not gotTheRollover then
  68.     if rollOver(9) then
  69.       set gotTheRollover to 1
  70.       if objectp(gAttractObject) then
  71.         kill(gAttractObject)
  72.       end if
  73.       set gNextAttractTime to the ticks + waitBetweenAttract
  74.       set NeedToReenter to the puppet of sprite 3 = 0
  75.       if (theActiveMenuSprite <> 9) or NeedToReenter then
  76.         mouseExit()
  77.         mouseEnter()
  78.       end if
  79.     end if
  80.   end if
  81. end
  82.  
  83. on mouseExit
  84.   if theActiveMenuSprite > 0 then
  85.     if not rollOver(theActiveMenuSprite) then
  86.       puppetSprite(3, 0)
  87.       updateStage()
  88.       set theActiveMenuSprite to 0
  89.     end if
  90.   end if
  91. end
  92.